<?php
if($_FILES) {
	require_once "easygd.php";
	$egd = new EasyGD;
	$egd->startFromFile($_FILES['upfile']);
	$egd->display();
	$egd->end();
} else {
?>
<html>
	<head>
		<title>EasyGD Upload</title>
	</head>
	
	<body>

	<form method='POST' enctype='multipart/form-data' action='upload.php'>
		<input type="file" name="upfile"><br />
		<input type="submit" value="Press"> to upload the file!
	</form>

	</body>
</html>
<?php } ?>